﻿using PRO.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PRO.Common;
using System.Data;
using PRO.Public;
using PRO.Config;

namespace web.Member.order
{
    public partial class manage : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "我的订单-" + BaseConfigs.Title;
            if (UserInfo.ID == 0)
                Response.Redirect("/login?url=" + Request.RawUrl.UrlEncode());
            else
            {
                if (!IsPostBack)
                    Bind();
            }
        }
        private void Bind()
        {
            int counts = 0;
            int pages = 0;
            this.Pager1.PageSize = 12;
            DataTable dt = PublicLib.CutPage("Pro_Order", "id", "buytime desc", this.Pager1.PageIndex, this.Pager1.PageSize, "id,orderid,totalprice,title,status,buytime", "", "", out pages, out counts);
            this.Pager1.RecordCount = counts;
            this.Repeater1.DataSource = dt;
            this.Repeater1.DataBind();
        }
    }
}